import Vue from 'vue'
import App from './App.vue'
import router from './router'
// import router from 'vue-router'
import './plugins/element.js'
//导入全局样式
import './assets/css/global.css'
//导入axios请求
import axios from 'axios'
//请求初始路径
// axios.defaults.baseURL = 'http://127.0.0.1:8091/'
axios.defaults.baseURL = 'https://www.liulongbin.top:8888/api/private/v1/'
//axios请求拦截器，添加token，保证拥有获取数据的权限
axios.interceptors.request.use(config => {
  console.log(config)
  config.headers.Authorization = window.sessionStorage.getItem('token')
  //最后必须return config
  return config
})
Vue.prototype.$axios=axios
Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
